package com.ogawa.joypal.distributionnetwork.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.ogawa.joypal.distributionnetwork.R
import com.ogawa.joypal.distributionnetwork.bean.SelectRoomBean

class DeviceManageAdapter:
    BaseQuickAdapter<SelectRoomBean, BaseViewHolder>(
        R.layout.item_select_room,
        ArrayList<SelectRoomBean>()
    ) {
    override fun convert(helper: BaseViewHolder, item: SelectRoomBean) {
        helper.setText(R.id.tv_content, item.roomName)
        if (item.isSelect){
            helper.setBackgroundRes(R.id.tv_content, R.drawable.shape_bg_stoke_blue_d8_radius_all_10)
        }else{
            helper.setBackgroundRes(R.id.tv_content, R.drawable.shape_bg_gray_stoke_d8_radius_all_10)
        }
    }
}